import 'package:package_info/package_info.dart';

//APP名称
//String appName = packageInfo.appName;
//包名
//String packageName = packageInfo.packageName;
//版本名
//String version = packageInfo.version;
//版本号
//String buildNumber = packageInfo.buildNumber;

class AppInfoHelper {
  static final AppInfoHelper _helper = AppInfoHelper.internal();

  AppInfoHelper.internal();

  factory AppInfoHelper() => _helper;

  Future<String> getAppVersion() async {
    PackageInfo packageInfo = await PackageInfo.fromPlatform();
    return packageInfo.version;
  }
}
